package router

import (
	"ruoyi-go-echo-ddd/internal/infrastructure/http/handler"

	"github.com/labstack/echo/v4"
)

// NewSysMenuResourcesRouter 系统菜单资源对应表路由初始化
func NewSysMenuResourcesRouter(group *echo.Group, sysMenuResources *handler.SysMenuResourcesHandler) {
	sysMenuResourcesRouterGroup := group.Group("/system/menu/resources")
	sysMenuResourcesRouterGroup.POST("", sysMenuResources.SaveHandler)
	sysMenuResourcesRouterGroup.PUT("", sysMenuResources.UpdateHandler)
	sysMenuResourcesRouterGroup.POST("/batchSave", sysMenuResources.BatchSaveHandler)
	sysMenuResourcesRouterGroup.GET("/list", sysMenuResources.SelectPageHandler)
	sysMenuResourcesRouterGroup.POST("/list", sysMenuResources.SelectPageHandler)
	sysMenuResourcesRouterGroup.GET("/:id", sysMenuResources.SelectOneHandler)
	sysMenuResourcesRouterGroup.DELETE("/:id", sysMenuResources.BatchDeleteHandler)
	sysMenuResourcesRouterGroup.GET("/export", sysMenuResources.ExportExcelBufferHandler)
}
